Repository navigation
Curation P1 (#255): one published opening on /on/love - #256
Conversation
…position, the exact word shows nothing (#255) Curation.PublishedReader is the default opening reader. A page's composition is the active :lexical_page composition of the resolved global default whose signature is the page's own lexemes (Compositions.active/4), read through Published.current/1 and mapped onto %Curation.Opening{}: the lead's rule and register from LeadPolicy, a definition highlight by its entry's opening block, a quotation by its line, each note as a reason signed with its stored author label, and the configuration, author and publication receipt. Nothing Published settled is checked again; a work or exemplar highlight is withheld as :unsupported_item. The fixture still answers only behind :curated_opening_fixtures and ?opening=fixture. The Opening component gains the published branch: a definition tile, withheld cards in a withheld item's own place, a disclosure of Configuration, Selected by, Published by, Panel, Withheld and Composition, and withheld_reason/1 for every reason the record gives, with a fallback. The fixture's rows are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hort card in its place, and the disclosure's summary shares its title's line (#255, the independent review) The reader no longer asks LeadPolicy.check/2 of the page's cards, which count a Bierce entry whose defining claim a reviewer rejected: a fallback lead Published.current/1 showed was withheld as :priority_source_available. A shown lead's rule now follows its source, and LeadPolicy only words it and finds its card. A withheld card is as tall as its words; the definition tile carries its register in its caption; the published summary sits beside "How this was curated", as #255 §2.1 draws it. Tests: a second reviewer publishes and the author is renamed after writing, so published_by, reviewed_by and each note's stored signature are told apart; a rejected Bierce defining claim keeps a Johnson lead; the withheld highlight's and lead's cards render in their places, with nothing of what they withheld. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ture, and of /words/14794/love, on a test partition (#255 §2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
…tarts at 882 px at 1280 × 900 (#255, the owner's decision on #256) The lead quote keeps text-3xl/10 at every width; sm:text-4xl/12 is gone, for the published opening and the fixture alike. The §2.1 desktop and §2.5 phone screenshots are re-taken; the phone's first screen now starts at the top of the page, at the headword. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The height lever, taken (the owner's decision 1 on #255)
Height at 1280 × 900, every
One thing to see before merging: the heading starts inside the first 900 px but its 28 px line ends 10 px past the fold. At exactly 1280 × 900 the word "Definitions" is cut in half (first screenshot). If the budget means the whole heading must show, it is 10 px short. I took no further lever. Precommit ( Re-taken screenshots (§2.1 desktop, §2.5 phone; the phone's first screen is at scroll 0 and starts at the headword): §2.5 phone, 375 × 812 at 2×: first screen, then the whole opening The phone's lead type is unchanged (it was already Ready to merge. Delivery B waits for the merge and then the owner's yes in chat. |



Delivery A of #255 (P1 of #254, under #253). The word page now reads what a reviewer published:
/on/loveshows its composition,/words/14794/loveshows nothing, and a withdrawal shows on the next request. Nothing here touches v2. Delivery B (the live proof on v2) waits for the owner's yes in chat.What changed
Curation.PublishedReader(new) implementsCuration.OpeningReaderfor the published origin. It resolves the scope by §3.1:Configurations.resolve_default/0, thenCompositions.active(config.id, :lexical_page, language, Compositions.signature(ids of page.headword.lexemes)), thenPublished.current/1. It maps the answer onto%Opening{origin: :published}as §4 lists, field by field. It re-checks nothingPublishedsettled: no eligibility, no binding table, no schema change. Reads only.Curation.Opening.reader/1returnsPublishedReaderby default.ManualFixtureanswers only when:curated_opening_fixturesis set and?opening=fixtureis asked, as before.WordLivealready calledOpening.for_page/2inload/5on every fresh request. The reader is now nevernil, so only the comments changed.DevilsDictionaryWeb.Openinggains the published branch (§5.2):withheld_reason/1is public and labels every reason the record emits (36 atoms, table-tested), with the plain fallback.docs/curation/persistence-slice-1.md(§5.1).Published's moduledoc no longer says no page reads it.Tests
Tests 1–14 of §6 are in the two files §5.1 names:
test/devils_dictionary/curation/published_reader_test.exs(1–8: 45 tests with test 8's table, plus a rejected-claim case under test 5) andtest/devils_dictionary_web/live/word_live_opening_test.exs(9–14, plus the §2.3 withheld cards: 9 tests through/on/love,/on/patienceand/words/:id/love). Four existing assertions changed because §4 and §2.6 change them:PublishedReaderwhere they expectednil;Precommit (
MIX_ENV=test MIX_TEST_PARTITION=_curation_p1 DD_NO_OBAN=1 mix precommit): 19 doctests, 2,836 tests, 1 failure. The one failure isRecoverySourceIdentityTest(routing, untouched here); see limitation 9. With a shorter partition (MIX_TEST_PARTITION=_cp1) the same precommit is 19 doctests, 2,836 tests, 0 failures.Demonstration (test partition, real routes)
On a private test-env database (
devils_dictionary_test_curation_p1_demo), with love built from the committed opening fixtures: the verb at object id 9051 and the noun at 14794, as on v2, so the routes read/on/loveand/words/14794/love. Served on 127.0.0.1:4017; 4007 was never touched. Every call was the real service, as one reviewer account (user 1, actor labelAccount #1), in Delivery B's order:Configurations.seed!/0global-default(draft), version 1 (bierce_first_v1), 5 proposed profilesConfigurations.activate/4, keyp1-255-activate-1Compositions.provision/3,:lexical_page,[9051, 14794],en653f3ba4…Compositions.create_version/3, notes from the authorLOVE/n(content 14795, rev 1); item 2 highlight 1 JohnsonLOVE n. s.(content 14796, rev 2); item 3 highlight 2 Milton under sense 14799 (rev 3,quotation:1)Reviews.decide/4 :accepted, keyp1-255-review-1Publications.publish/3, keyp1-255-love-1,expected_pointer: nilGET /on/love/words/14794/loveshows noneRegistry.add_sense_revision/2on sense 14799 (words unchanged):revision_superseded(§2.3)Publications.withdraw/3, keyp1-255-love-withdraw-1GET /on/loveCounts before seed → after publish:
curation_configurations0 → 1,curation_configuration_versions0 → 1,curator_profiles0 → 5,editorial_compositions0 → 1,editorial_composition_items0 → 3,editorial_composition_publications0 → 1 (→ 2 after withdraw),oban_jobs0 → 0. The 12oban_jobspresent after withdraw are allDiscovery.RunWorker, enqueued by the browser's first connected page loads (discovery's refresh-on-visit). Publish and withdraw enqueued nothing.Screenshots
Every
<details>closed unless the name says open. Taken before1c4465a's lead-rule fix, which renders identically for a Bierce lead, and after its layout changes. 1280 × 900 at 1×; 375 × 812 at 2×; "section" is the whole opening at 375.§2.1 published, 1280 × 900. Definitions heading at 946 px (limitation 1).

§2.2 the disclosure open, 1280. Configuration, Selected by, Published by, Panel, Withheld, Composition; no assessment rows.

§2.5 phone, 375: first screen, and the whole opening. One column, lead first, disclosure collapsed. "Read the whole entry", "The entry among the definitions" and each "Why this is here" are 44 px tall; no horizontal scroll.


§2.3 one item withheld (sense revision 3 superseded by 5), 1280, closed and open, and 375. The slot keeps a short card; nothing of the quotation is shown; the disclosure names it.



§2.4 withdrawn, 1280 and 375. No heading, no skeleton; the page begins at Definitions (390 px at 1280).


§2.6 the fixture, for comparison (



?opening=fixture, test config), 1280, its disclosure, and 375. Banner, "Selection … not a published composition", "Reviewed by: Nobody yet", "Configuration: None…"; no Published by, no Panel. Its Definitions heading is at 1,232 px.§2.7

/words/14794/lovewhile/on/loveis published, 1280. Nothing; Definitions at 209 px.Not taken: §2.2 at 375, because the demo's composition had been superseded and withdrawn by then. The open disclosure is the same rows in one column.
Independent review, addressed
One independent review (a fresh agent, code only) found no blockers and three should-fixes, all taken in
1c4465a:LeadPolicy.check/2on the page's cards, which count a Bierce entry whosedefinesclaim a reviewer rejected, wherePublished.current/1had appliedLeadRule. A valid fallback lead was withheld as:priority_source_available. A shown lead's rule now follows its source;LeadPolicyonly words it and finds its card. The new test fails on the old code with exactly that error.Its nits were taken too:
Highlight.registeradmits:definition, andfor_page/2's doc no longer mentions a missing reader. The lead link's tap-target class is noted under limitation 4.Limitations, said plainly
Update, 23 October: the owner chose the typographic lever;
7cb26a5takes it. The heading now starts at 882 px, and its line ends at 910 px (see the comment). What follows is the original finding.The height budget is not met: the Definitions heading is at 946 px at 1280 × 900, budget 900. As first built it was 1,006. The spec's lever, quoting the lead's first sentence, was already applied. Two changes inside the published branch brought it to 946: §2.1's one-line disclosure summary, and the definition tile's chip in its caption. The remaining excess is mostly Johnson's required CC BY credit, five lines at half width, together with the 4xl lead. Measured in the browser (CSS only, nothing committed):
sm:text-4xl/12→text-3xl/10), shared with the fixtureBoth remaining levers change something outside this issue: the lead's Phase 1 typography, or the rule that a licence's credit sits next to the item. That's the owner's call, so this PR does neither. Say which and it's a one-line follow-up.
The exact-word page cannot have a
:lexical_pagecomposition beside the On page's.[14794]overlaps[9051, 14794], soCompositions.provision/3refuses it ({:overlapping_scope, [id]}, K3). That's why §2.7's page shows nothing. Test 7 therefore provisions the exact word as a:lexemescope, which this reader does not read, and asserts the refusal.WordPagehas nolanguage_tag. §5.1 says to passpage.language_tag. The reader takes the language frompage.headword.lexemes[].language. A page whose words span languages has no lexical-page scope, so it gets no opening.A definition highlight needed a tile. §5.2 does not list one, but §2.1 and §5.3 put Johnson's entry in a highlight. The component drew only artworks, quotations and exemplars, so I added a
:definitionkind and tile. It quotes the entry's whole first block (Johnson numbers his senses, so a first sentence would be "1."). Its "Read the whole entry" link, and the lead's, are 44 px tap targets on a phone (§2.5); the lead's link is shared with the fixture.workandexemplarhighlights are withheld as:unsupported_item. P1's composition pins neither (§5.3), and mapping them is later parts' work (the pin, P3). They are named, never drawn.Opening.Configuration.resolution_policy_versionis 1 by definition.resolve_default/1has one policy (C7) and returns no version number. Struct fields were added:Configuration.lead_rule,Review.published_by/published_on/receipt_idand state:published,Highlight.excerptand kind:definition. These are view-model fields, not schema.Who is named is the actor's label. Selected by, Published by and each note's signature show the label the database recorded (
Compositions.author_label/1):Account #Nunless that actor row carries another. The wireframe's "Holden (operator)" appears only if the owner's actor row says "Holden". P1 renames nothing.An open page does not update on withdrawal. The next request shows nothing (test 11). Prompt reader stability is Curation agent MVP: what an editor does, what a curated entry contains, how the page looks, how the owner and the bots share one record, and how it stays current (under #193) #253 §6a, P5.
Precommit on
_curation_p1:recovery_source_identity_test.exsnames scratch databases"#{base}_identity_#{System.unique_integer}_source_renamed". With this partition the base is 34 characters, so once the integer reaches five digits, as it does deep in a full run, the name is 64 bytes and Postgres refuses it ("expected a binary string of less than 64 bytes"). Alone, the file passes, on this branch and onmain. Run to run, one or two of its tests fail. It is the partition name's, not this change's, so this PR does not touch the test. Fixing it (hash or truncate the name) is a small issue of its own.🤖 Generated with Claude Code
Summary by CodeRabbit